package com.sale.system.mapper;

/**
 * 公共Mapper
 *
 * @author huguangsong
 * @version 1.0.0
 * @package com.trustslink.contract.mapper
 * @className BaseMapper
 * @date 2021-08-16  13:47
 */
public interface BaseMapper<E> {

    /**
     * 删除
     *
     * @param id
     * @return int
     * @throws
     * @method deleteByPrimaryKey
     * @author huguangsong
     * @date 2021/8/16 13:51
     */
    int deleteByPrimaryKey(Integer id);


    /**
     * 插入
     *
     * @param record
     * @return int
     * @throws
     * @method insert
     * @author huguangsong
     * @date 2021/8/16 13:52
     */
    int insert(E record);

    /**
     * 选择插入
     *
     * @param record
     * @return int
     * @throws
     * @method insertSelective
     * @author huguangsong
     * @date 2021/8/16 13:52
     */
    int insertSelective(E record);


    /**
     * 查询
     *
     * @param id
     * @return T
     * @throws
     * @method selectByPrimaryKey
     * @author huguangsong
     * @date 2021/8/16 13:52
     */
    E selectByPrimaryKey(Integer id);

    /**
     * 选择更新
     *
     * @param record
     * @return int
     * @throws
     * @method updateByPrimaryKeySelective
     * @author huguangsong
     * @date 2021/8/16 13:53
     */
    int updateByPrimaryKeySelective(E record);

    /**
     * 更新
     *
     * @param record
     * @return int
     * @throws
     * @method updateByPrimaryKey
     * @author huguangsong
     * @date 2021/8/16 13:53
     */
    int updateByPrimaryKey(E record);
}
